package team.niit.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * @Author: HAPPY
 * @Project_name: stu_select_course
 * @Package_name: team.niit.bean
 * @Date: 2021/10/25 23:53
 * explain: 课程实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Entity(name = "course")
public class CourseEntity {
    /**
     * 编号
     */
    @Id
    @Column(name = "id")
    private String id;

    /**
     * 名称
     */
    @Column(name = "name")
    private String name;

    /**
     * 学分
     */
    @Column(name = "credit")
    private String credit;

    /**
     * 名额
     */
    @Column(name = "quota")
    private Integer quota;

    /**
     * 任课教师
     */
    @Column(name = "teacher")
    private String teacher;

    /**
     * 类别
     */
    @Column(name = "category")
    private String category;

    /**
     * 时间
     */
    @Column(name = "time")
    private String time;

    /**
     * 周次
     */
    @Column(name = "week")
    private String week;

    /**
     * 上课地址
     */
    @Column(name = "address")
    private String address;

    /**
     * 时间索引
     */
    @Column(name = "no")
    private Integer no;

    public CourseEntity(String name, String credit, Integer quota, String teacher, String category, String time, String week, String address, Integer no) {
        this.name = name;
        this.credit = credit;
        this.quota = quota;
        this.teacher = teacher;
        this.category = category;
        this.time = time;
        this.week = week;
        this.address = address;
        this.no = no;
    }
}
